#include "infowindow.h"
#include "ui_infowindow.h"
#include <QFont>
#include <QColor>

infoWindow::infoWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::infoWindow)
{
    ui->setupUi(this);
    this->setWindowTitle("版本信息");
    //背景
    this->setAutoFillBackground(true);
    QPalette pal = this->palette();
    pal.setBrush(QPalette::Window,
                     QBrush(QPixmap(":/imageUsed/infoBG.jpg").scaled( this->size(),
                                                                                Qt::IgnoreAspectRatio,
                                                                                Qt::SmoothTransformation)));
    this->setPalette(pal);
    this->setStyleSheet("color:rgb(97,59,156)");
    ui->pushButton->setStyleSheet("QPushButton{"
                                  "border:2px solid rgb(97,59,156);"
                                  "background: transparent;"
                                  "border-radius: 4px;"
                                  "color:rgb(97,59,156);}"
                                  "QPushButton:hover{"
                                  "background-color: rgb(169,171,181);"
                                  "color:white;"
                                  "border:2px solid rgb(255,255,255);}");
    QFont ft;
    ft.setPointSize(15);
    ui->label->setFont(ft);
    ui->label_2->setFont(ft);
    ui->label_3->setFont(ft);
    ui->label_4->setFont(ft);
    ui->label_5->setFont(ft);
    ui->label_6->setFont(ft);
}

infoWindow::~infoWindow()
{
    delete ui;
}

void infoWindow::on_pushButton_clicked()
{
    this->close();
}
